xen/hvm: Fix handling of obsolete HVM_PARAMs
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Feb 2020 12:40:50 +0000 (12:40 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Feb 2020 15:21:40 +0000 (15:21 +0000)
commitea53652d78cddd36d99f53a87591910da0c9b1ef
tree2b341c193e90b1c0c3206a69917456215941f7e3
parent744807bdb02e49c5c79082118ef24e93b94cf158
xen/hvm: Fix handling of obsolete HVM_PARAMs

The local xc_hvm_param_deprecated_check() in libxc tries to guess Xen's
behaviour for the MEMORY_EVENT params, but is wrong for the get side, where
Xen would return 0 (which is also a bug).  Delete the helper.

In Xen, perform the checks in hvm_allow_set_param(), rather than
hvm_set_param(), and actually implement checks on the get side so the
hypercall doesn't return successfully with 0 as an answer.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libxc/xc_domain.c
xen/arch/x86/hvm/hvm.c
xen/include/public/hvm/params.h